#!/bin/sh

args="--prefix=../../build --enable-gpl --disable-debug --disable-shared --enable-static \
  --enable-runtime-cpudetect --disable-doc --disable-programs \
  --disable-avdevice --disable-avfilter --enable-swresample \
  --disable-avresample --enable-pthreads --disable-dxva2 --disable-vdpau --disable-postproc \
  --disable-encoders --disable-muxers --disable-devices --disable-filters"
  
kern=`uname -s`
if test $kern = "Darwin"
then
  echo "Build for OS X"
  args="$args --enable-vda --disable-vaapi"
elif test $kern = "Linux"
then
  echo "Build for Linux"
  args="$args --disable-vda --enable-vaapi"
fi

cd src/ffmpeg* && make distclean; ./configure $args && make -j 6 && make install
